<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
  <head>
    <title>选课系统</title>
    <link rel="stylesheet" th:href="@{/styles.css}" />
  </head>

  <body>
   <form method="POST" th:object="${information}">
      <label for="name">姓名: </label>
      <input name="name" type="text" th:field="*{name}"/>
      <span class="validationError"
            th:if="${#fields.hasErrors('name')}"
            th:errors="*{name}">Error</span>
      <br/>
      
      <label for="number">学号: </label>
      <input name="name" type="text" th:field="*{number}"/>
      <span class="validationError"
            th:if="${#fields.hasErrors('number')}"
            th:errors="*{number}">Error</span>
      <br/>
      
      <label for="year">年级: </label>
      <input name="name" type="text" th:field="*{year}"/>
      <span class="validationError"
            th:if="${#fields.hasErrors('year')}"
            th:errors="*{year}">Error</span>
      <br/>
      
      <label for="major">专业: </label>
      <input name="name" type="text" th:field="*{major}"/>
      <span class="validationError"
            th:if="${#fields.hasErrors('major')}"
            th:errors="*{major}">Error</span>
      <br/>
      
      <label for="college">学院: </label>
      <input name="name" type="text" th:field="*{college}"/>
      <span class="validationError"
            th:if="${#fields.hasErrors('college')}"
            th:errors="*{college}">Error</span>
      <br/>
      <button>提交你的信息</button>
      </form>
  </body>
</html>